import { AddPurchaseSettlementComponent } from './purchase-settlement/add-purchase-settlement/add-purchase-settlement.component';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PurchaseComponent } from './purchase.component';
import { PurchaseRequirementComponent } from './purchase-requirement/purchase-requirement.component';
import { PurchaseRequirementAddComponent } from './purchase-requirement/purchase-requirement-add/purchase-requirement-add.component';
import { PurchaseRequirementEditComponent } from './purchase-requirement/purchase-requirement-edit/purchase-requirement-edit.component';
import { PurchaseOrderComponent } from './purchase-order/purchase-order.component';
import { PurchaseOrderAddComponent } from './purchase-order/purchase-order-add/purchase-order-add.component';
import { PurchaseOrderEditComponent } from './purchase-order/purchase-order-edit/purchase-order-edit.component';
import { PurchaseArrivalComponent } from './purchase-arrival/purchase-arrival.component';
import { PurchaseArrivalAddComponent } from './purchase-arrival/purchase-arrival-add/purchase-arrival-add.component';
import { PurchaseReturnComponent } from './purchase-return/purchase-return.component';
import { PurchaseReturnAddComponent } from './purchase-return/purchase-return-add/purchase-return-add.component';
import { PurchaseOutsourceOrderComponent } from './purchaseOut/purchase-outsource-order/purchase-outsource-order.component';
import { PurchaseArrivalEditComponent } from './purchase-arrival/purchase-arrival-edit/purchase-arrival-edit.component';
import { PurchaseReturnEditComponent } from './purchase-return/purchase-return-edit/purchase-return-edit.component';
import { PurchaseOutsourceOrderEditComponent } from './purchaseOut/purchase-outsource-order/purchase-outsource-order-edit/purchase-outsource-order-edit.component';
import { PurchaseOutsourceOrderAddComponent } from './purchaseOut/purchase-outsource-order/purchase-outsource-order-add/purchase-outsource-order-add.component';
import { PurchaseOutsourceArrivalComponent } from './purchaseOut/purchase-outsource-arrival/purchase-outsource-arrival.component';
import { PurchaseOutsourceArrivalAddComponent } from './purchaseOut/purchase-outsource-arrival/purchase-outsource-arrival-add/purchase-outsource-arrival-add.component';
import { PurchaseOutcourceArrivaEditComponent } from './purchaseOut/purchase-outsource-arrival/purchase-outcource-arriva-edit/purchase-outcource-arriva-edit.component';
import { PurchaseOutsourceReturnComponent } from './purchaseOut/purchase-outsource-return/purchase-outsource-return.component';
import { PurchaseOutsourceReturnAddComponent } from './purchaseOut/purchase-outsource-return/purchase-outsource-return-add/purchase-outsource-return-add.component';
import { PurchaseOutsourceReturnEditComponent } from './purchaseOut/purchase-outsource-return/purchase-outsource-return-edit/purchase-outsource-return-edit.component';
import { PurchaseWorkbenchComponent } from './purchase-workbench/purchase-workbench.component';
import { CanActivateGuard } from 'src/app/@core/services/can-load-service.guard';
import { PurchaseSettlementComponent } from './purchase-settlement/purchase-settlement.component';
import { IngredientReimbursementApprovalComponent } from './ingredient-reimbursement-approval/ingredient-reimbursement-approval.component';
import { IngredientReimbursementApprovalAddComponent } from './ingredient-reimbursement-approval/ingredient-reimbursement-approval-add/ingredient-reimbursement-approval-add.component';
import { PurchaseLedgerComponent } from './purchase-ledger/purchase-ledger.component';

const routes: Routes = [
  {
    path: '',
    component: PurchaseComponent,
    children: [
      {
        path: 'purchase-require',
        component:PurchaseRequirementComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path: 'purchase-require-add',
        component:PurchaseRequirementAddComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path: 'purchase-require-edit/:id',
        component:PurchaseRequirementEditComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-order',
        component:PurchaseOrderComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path: 'purchase-order-add',
        component:PurchaseOrderAddComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path: 'purchase-order-edit/:id',
        component:PurchaseOrderEditComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-arrival',
        component:PurchaseArrivalComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-arrival-add',
        component:PurchaseArrivalAddComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-arrival-edit/:id',
        component:PurchaseArrivalEditComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-return',
        component:PurchaseReturnComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-return-add',
        component:PurchaseReturnAddComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-return-edit/:id',
        component:PurchaseReturnEditComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-outsource',
        component:PurchaseOutsourceOrderComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-outsource-add',
        component:PurchaseOutsourceOrderAddComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-outsource-edit/:id',
        component:PurchaseOutsourceOrderEditComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-outsource-arrival',
        component:PurchaseOutsourceArrivalComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:"purchase-outsource-arrival-add",
        component:PurchaseOutsourceArrivalAddComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:"purchase-outsource-arrival-edit/:id",
        component:PurchaseOutcourceArrivaEditComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-outsource-return',
        component:PurchaseOutsourceReturnComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-outsource-return-add',
        component:PurchaseOutsourceReturnAddComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-outsource-return-edit/:id',
        component:PurchaseOutsourceReturnEditComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-workbench',
        component:PurchaseWorkbenchComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-payment',
        component:PurchaseSettlementComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path: 'add-purchase-payment',
        component:AddPurchaseSettlementComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path:'purchase-ledger',
        component:PurchaseLedgerComponent,
        canActivate:[CanActivateGuard]
      },
      {
        path: 'ingredient-reimbursement-approval',
        component:IngredientReimbursementApprovalComponent,
        canActivate: [CanActivateGuard]
      },
      {
        path: 'ingredient-reimbursement-approval-add',
        component:IngredientReimbursementApprovalAddComponent,
        canActivate: [CanActivateGuard]
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class PurchaseRoutingModule { }
